﻿using hhttp;
using hq;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Threading;
using System.Web.Http;


namespace GK.WCS.Open
{
    ///Print/code
    [RoutePrefix("Print")]
    public class PrintServer :BaseApiController {
        [HttpGet, Route("d2/{code}")]
        public String code(String code)
        {
            GKtsc.openportExt();
          
                GKtsc.printVehicleCode(code);
            
            GKtsc.next();
            GKtsc.closeportExt();


            return "ok";

        }
        private static object obj = new object();

        [HttpGet, Route("d1/{code}")]
        public String simpleC(String  code)
        {
                GKtsc.openport1V();
               
                GKtsc.printFinanceCode(code);
                 
                GKtsc.next();
                GKtsc.closeportExt();
                Thread.Sleep(100);
          
            return "ok";

        }


    }
}
